home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
7_9.lha
/
7_9
/
7_9_next.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
504b
|
31 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
include <stream.h>
/ Get the next entry from a list,
/ moving curr forward.
nt dlist::next(dlink *&a)
if (!last)
return 0;
// move curr forward, possibly to
// the beginning or end of the list.
if (curr)
if (curr == last)
{
curr = 0;
return 0;
}
else
curr = curr->next;
else
curr = last->next;
a = curr;
return 1;